/**************************************************************************
 *                                                                        *
 *         Copyright (c) 2007 by Sunplus mMedia Inc.                      *
 *                                                                        *
 *  This software is copyrighted by and is the property of Sunplus        *
 *  mMedia Inc. All rights are reserved by Sunplus mMedia Inc.  This      *
 *  software may only be used in accordance with the corresponding        *
 *  license agreement. Any unauthorized use, duplication, distribution,   *
 *  or disclosure of this software is expressly forbidden.                *
 *                                                                        *
 *  This Copyright notice MUST not be removed or modified without prior   *
 *  written consent of Sunplus mMedia Inc.                                *
 *                                                                        *
 *  Sunplus mMedia Inc. reserves the right to modify this software        *
 *  without notice.                                                       *
 *                                                                        *
 *  Sunplus mMedia Inc.                                                   *
 *  19-1, Innovation First Road, Science-Based Industrial Park,           *
 *  Hsin-Chu, Taiwan, R.O.C.                                              *
 *                                                                        *
 **************************************************************************/

#ifndef __DOSVAR_H__
#define __DOSVAR_H__
//------------------------------------------------------------------------------
//External variable
//------------------------------------------------------------------------------

//-------------------------------------
//dosdat.h
//-------------------------------------
extern	code	UINT8	G_DOS_SIG[];
extern	code	UINT8	G_DOS_MBSP_128M[];
extern	code	UINT8	G_DOS_PBSP_128M[];
extern	code	UINT8	G_DOS_MBSP_64M[];
extern	code	UINT8	G_DOS_PBSP_64M[];
extern	code	UINT8	G_DOS_MBSP_32M[];
extern	code	UINT8	G_DOS_PBSP_32M[];
extern	code	UINT8	G_DOS_MBSP_16M[];
extern	code	UINT8	G_DOS_PBSP_16M[];
extern	code	UINT8	G_DOS_MBSP_8M[];
extern	code	UINT8	G_DOS_PBSP_8M[];
extern	code	UINT8	G_DOS_MBSP_4M[];
extern	code	UINT8	G_DOS_PBSP_4M[];
extern	code	UINT8	G_DOS_DirCurrentParent[];

//-------------------------------------
//dosdef.h
//-------------------------------------

//-------------------------------------
//dosdir.c
//-------------------------------------

//-------------------------------------
//dosfat.c
//-------------------------------------
extern	xdata   UINT16    G_DOS_FreeFatTable[];
extern	xdata	UINT16	G_DOS_FreeTableIndex;
extern	xdata   UINT16    G_DOS_PrevCluster;
extern	xdata	UINT32	G_DOS_FatNextAddr;
extern	xdata	UINT16	G_DOS_FatNextCluster;
extern	xdata	UINT8	G_DOS_FatNextFlag;
extern	xdata   UINT16    G_Card_BlockSize;
extern	xdata   UINT8    G_Card_BlockSizeShift;
extern	data	UINT16	G_Media_Behavior;
extern	xdata	UINT16	G_DOS_FileEndCluster;
extern	xdata   UINT32   G_Card_TotalCardSize; 
extern	xdata   UINT16    G_DOS_MaxCluster;	// @012403@wyeo@prevent dir hang

//-------------------------------------
//dosfile.c
//-------------------------------------
extern	xdata	UINT32	G_DOS_DstStartLogAddr;	// @012403@wyeo@support 256M nand
extern	xdata	UINT16	G_DOS_LeftClusterSize;	// @012403@wyeo@support 256M nand
extern	xdata   UINT16    G_DOS_StartClusterNumber;
extern	xdata   UINT16    G_DOS_MidCluster;
extern	xdata	UINT16	G_DOS_FreeTableTotal;
extern	xdata   UINT8    G_File_FirstEnter;
extern	xdata 	UINT32 	G_File_FrameSize;
extern	xdata	UINT16	G_DOS_FileStartCluster;
extern	xdata	UINT32	G_DOS_FileSizeKeep;
extern	xdata	UINT16	G_DOS_FileCurrCluster;
extern	xdata	UINT16	G_DOS_FileClusterIndex;
extern	xdata	UINT16	G_DOS_PrevFileCurrCluster;	// WWWW0327
extern	xdata	UINT16	G_DOS_PrevFileClusterIndex;	// WWWW0327

//-------------------------------------
//doscore.c
//-------------------------------------
extern	xdata   UINT16    G_Card_PrevLogBlock;
extern	idata	UINT32	G_Card_EndBlkLogAddr;
extern  idata	UINT32 	G_Card_OldPhyAddr;
extern  idata	UINT32	G_Card_NewPhyAddr;
extern  xdata	UINT32 	G_Card_OldPhyStartAddr;
extern  xdata	UINT32 	G_Card_OldLogStartAddr;
extern  xdata   UINT32   G_Card_PhyBlockAddr;

//-------------------------------------
//dosusb.c
//-------------------------------------
extern	xdata   UINT8    G_DOS_USBDataReady;    // 500 use

#endif /*__DOSVAR_H__*/
